package cn.edu.sgu.www.mhxysy.dto.chongwu;

import cn.edu.sgu.www.mhxysy.consts.CustomMessages;
import cn.edu.sgu.www.mhxysy.consts.RegExps;
import cn.edu.sgu.www.mhxysy.dto.DataTransferObject;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * @author 沐雨橙风ιε
 * @version 1.0
 */
@Data
@ApiModel
public class ChongwuNeidanDTO implements DataTransferObject {

    /**
     * 内丹类型
     */
    @ApiModelProperty(value = "内丹类型")
    private Integer type;

    /**
     * 镶嵌位置
     * 取值：0、1、2、3、4、5
     * 高级内丹：0；低级内丹：1~4；专属内丹：5
     */
    @Range(min = 0, max = 5, message = "镶嵌位置" + CustomMessages.ILLEGAL)
    @NotNull(message = "镶嵌位置" + CustomMessages.NOT_NULL)
    @ApiModelProperty(value = "镶嵌位置", required = true)
    private Integer location;

    /**
     * 宠物ID
     */
    @Pattern(regexp = RegExps.CHONGWU_ID, message = "宠物ID" + CustomMessages.ILLEGAL)
    @NotBlank(message = "宠物ID" + CustomMessages.NOT_NULL)
    @ApiModelProperty(value = "宠物ID", required = true)
    private String chongwuId;
}